pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    let n = threshold;
    let (mut a, mut b, mut ans) = (1, 0, 0);
    while a < n {
        if a % 2 == 1 {
            ans += a;
        }
        a += b;
        b = a - b;
    }
    ans
}
